package com.cloud.server.configurer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.cloud.server.hoock.ServerRegistar;
import com.cloud.server.properties.CloudServerPorperties;


@Configuration
@ConditionalOnWebApplication
@EnableConfigurationProperties(CloudServerPorperties.class)
public class CloudServerAutoConfigurer {
	@Autowired
	private CloudServerPorperties cloudServerPorperties;
	
	@Bean
	public ServerRegistar serverRegistar() {
		return new ServerRegistar(cloudServerPorperties);
	}
	
}